module PostsHelper

  def post_carousel_item_for(index, &block)

    cls = index_for(index)

    content_tag(:div, class: "item #{cls} article-list") do
      block.call
    end

  end


  private

  def index_for(index)
    index == 0 ? 'active' : ''
  end
end
